<div class="main layui-clear">
    <div class="wrap">
        <div class="content" style="margin-right:0">
            <div class="fly-tab">
                <span>
                    <a href="{:U('home/index/wenda')}">全部</a>
                    <a href="{:U('home/index/wenda',array('status'=>0))}">未结帖</a>
                    <a href="{:U('home/index/wenda',array('status'=>1))}">已采纳</a>
                    <a href="{:U('home/index/wenda',array('status'=>2))}">精帖</a>
                    <?php if (isset($_SESSION['username'])) { ?>
                    <a href="{:U('home/user/myuser')}">我的帖</a>
                    <?php } ?>
                </span>
                <form action="{:U('home/pscws4/index')}" class="fly-search">
                    <i class="iconfont icon-sousuo">
                    </i>
                    <input class="layui-input" autocomplete="off" placeholder="搜索内容，回车跳转"
                    type="text" name="q">
                </form>
                <?php if (isset($_SESSION['username'])) { ?>
                   <a href="{:U('home/Question/index')}" class="layui-btn jie-add">发布问题</a>
                <?php } ?>
            </div>
            <ul class="fly-list">
            <?php foreach ($list as $l) { ?>
                <li class="fly-list-li">
                    <a href="{:U('home/user/my',array('id'=>$l['uid']))}" class="fly-list-avatar">
                        <img src="__ROOT__{$l['face']}" alt="{$l['username']}">
                    </a>
                    <h2 class="fly-tip">
                        <a href="{:U('home/question/question',array('id'=>$l['id']))}">
                            {$l['title']}
                        </a>
                        <?php if ($l['is_top']==1) { ?>
                          <span class="fly-tip-stick">
                            置顶
                        </span>  
                        <?php } ?>
                        <?php if ($l['is_jing']==1) { ?>
                        <span class="fly-tip-jing">
                            精贴
                        </span>
                        <?php } ?>
                    </h2>
                    <p>
                        <span>
                            <a href="{:U('home/user/my',array('id'=>$l['uid']))}">
                                {$l['username']}
                            </a>
                        </span>
                        <span>
                            <?php echo run($l['create_time'])?>
                        </span>
                        <span>
                            {$l['cname']}
                        </span>
                        <span class="fly-list-hint">
                            <i class="iconfont" title="回答">
                                &#xe60c;
                            </i>
                            {$l['answer_num']}
                            <i class="iconfont" title="人气">
                                &#xe60b;
                            </i>
                            {$l['view_num']}
                        </span>
                    </p>
                </li>
            <?php } ?>
            </ul>
            <div style="text-align: center">
            <style>
                .fenye{ margin-top: 20px;}
                .fenye div a,.fenye div span{display: inline-block;padding: 5px 15px;margin-right: -1px;border: 1px solid #1AA094;}
                .fenye div span{background: #1AA094;color: #fff;}
            </style>
                <div class="fenye">
                {$page}
                </div>
            </div>
        </div>
    </div>
</div>

